/* ===== 基础布局 ===== */
.container {
  @apply relative overflow-visible max-w-full mx-auto bg-transparent;
}

.content-wrapper {
  @apply bg-white rounded-2xl shadow-md p-6 md:p-8 mt-5 border border-gray-200;
}

/* ===== 列表项 ===== */
.essay-item {
  @apply flex items-center p-5 bg-white border border-gray-200 rounded-xl mb-4 transition-all;
  &:hover {
    @apply transform -translate-y-0.5 shadow-lg border-blue-500;
    &::before {
      @apply opacity-100;
    }
  }
  &::before {
    @apply content-[''] absolute left-0 top-0 h-full w-1 bg-gradient-to-b from-blue-500 to-blue-300 opacity-0 transition-opacity;
  }
}

.essay-title {
  @apply flex-1 text-gray-800 font-medium;
}

.essay-score {
  @apply bg-gray-100 px-4 py-2 rounded-full font-semibold text-blue-500;
}

.essay-meta {
  @apply flex gap-4 mt-3 text-sm text-gray-500;
}

/* ===== 模态框系统 ===== */
.modal {
  @apply fixed inset-0 z-50 hidden bg-black bg-opacity-50 overflow-auto;
  &-content {
    @apply bg-white rounded-xl shadow-xl p-6 my-[10%] mx-auto w-[90%] max-w-2xl;
    animation: slideIn 0.3s ease-out;
  }
}

.user-modal {
  @apply bg-gradient-to-br from-white to-blue-50 rounded-3xl p-8 max-w-md;
}

.close-button {
  @apply absolute top-5 right-5 text-2xl text-gray-500 hover:text-blue-500 cursor-pointer transition-colors;
}

/* ===== 交互元素 ===== */
.button {
  @apply px-6 py-3 rounded-full flex items-center gap-2 transition-all;
  &-primary {
    @apply bg-blue-600 text-white hover:bg-blue-700;
  }
  &-secondary {
    @apply bg-white text-blue-600 border-2 border-blue-600 hover:bg-blue-50;
  }
  &-danger {
    @apply bg-red-500 text-white hover:bg-red-600;
  }
}

/* ===== 加载状态 ===== */
.loading-state {
  @apply flex justify-center items-center p-10;
  .spinner {
    @apply w-10 h-10 border-4 border-gray-200 border-t-blue-500 rounded-full animate-spin;
  }
}

/* ===== 动画 ===== */
@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
  .content-wrapper {
    @apply p-4 rounded-lg;
  }
  .essay-item {
    @apply p-4;
    .essay-score {
      @apply static mt-3 mx-auto;
    }
  }
}
/* 内容容器（匹配图片的白色背景） */
.content-wrapper {
  background: white;
  border-radius: 8px;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 列表容器 */
.essay-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px; /* 项与项之间的间隙 */
}

/* 作文单项样式 */
.essay-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
  border: 1px solid #f0f0f0; /* 匹配图片的分割线样式 */
}

/* 悬停效果（匹配图片的交互反馈） */
.essay-item:hover {
  background-color: #f9f9f9;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 标题样式 */
.essay-title {
  font-size: 15px;
  color: #333;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

/* 日期样式 */
.essay-date {
  font-size: 13px;
  color: #888;
  margin-left: 10px;
}

/* 加载状态（保持图片中的样式） */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
}
/* 确保导航栏不遮挡内容 */
body {
  padding-top: 64px; /* 匹配导航栏高度 */
}

/* 导航栏固定定位 */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px; /* 固定高度 */
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 主内容区域 */
main {
  margin-top: 64px; /* 导航栏高度 */
  padding: 20px 0;
}

/* 内容容器（匹配图片风格） */
.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 24px;
}

/* 列表容器 */
.essay-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 作文项样式（匹配图片设计） */
.essay-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background: white;
  border: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.essay-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  border-color: #e0e8ff;
}

/* 标题和日期样式 */
.essay-title {
  flex: 1;
  font-size: 15px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.essay-date {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
}

/* 加载状态 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
}

/* 评分概览样式 */
.score-overview {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.overall-score {
  text-align: center;
  margin-right: 30px;
}

.score-value {
  font-size: 48px;
  font-weight: 700;
  color: #3b82f6;
  display: block;
  line-height: 1;
}

.score-label {
  color: #666;
  font-size: 14px;
}

/* 详细评分区块 */
.score-section {
  margin-bottom: 25px;
}

.score-section h3 {
  color: #333;
  font-size: 18px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
}

.section-score {
  color: #3b82f6;
  font-weight: 600;
}

/* 评分条样式 */
.bar-item {
  margin-bottom: 10px;
}

.bar-label {
  display: inline-block;
  width: 80px;
  color: #666;
  font-size: 14px;
}

.bar-container {
  display: inline-flex;
  align-items: center;
  width: calc(100% - 100px);
}

.bar-fill {
  height: 8px;
  background: linear-gradient(to right, #60a5fa, #3b82f6);
  border-radius: 4px;
  margin-right: 10px;
  transition: width 0.5s ease;
}

.bar-value {
  color: #333;
  font-weight: 500;
  font-size: 14px;
  min-width: 20px;
}

/* 优秀句子和建议 */
.recommendation-section {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.good-sentences, .suggestions {
  flex: 1;
}

.sentence-list, .suggestion-list {
  padding-left: 20px;
  color: #444;
}

.sentence-list li {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 3px solid #10b981;
  border-radius: 0 4px 4px 0;
}

.suggestion-list li {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 3px solid #f59e0b;
  border-radius: 0 4px 4px 0;
}

/* 动画 */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* 确保有以下基础样式 */
.modal {
  display: none; /* 默认隐藏 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

.modal.show {
  display: flex; /* 或 block */
}

.modal.hidden {
  display: none;
}
/* 基础样式 */
:root {
  --primary-color: #4361ee;
  --success-color: #4cc9f0;
  --warning-color: #f8961e;
  --danger-color: #f94144;
  --dark-color: #212529;
  --light-color: #f8f9fa;
}

/* 弹窗容器 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.show .modal-container {
  transform: translateY(0);
}

/* 头部样式 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.modal-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--dark-color);
  display: flex;
  align-items: center;
}

.rating-icon {
  color: #ffd700;
  margin-right: 10px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6c757d;
  transition: all 0.2s ease;
}

.close-btn:hover {
  color: var(--danger-color);
  transform: rotate(90deg);
}

/* 评分卡片 */
.score-card {
  padding: 20px;
}

.overall-score {
  text-align: center;
  margin-bottom: 30px;
}

.score-value {
  font-size: 3.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 10px 0;
}

.score-label {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 10px;
}

.score-progress {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  max-width: 300px;
  margin: 0 auto;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  transition: width 0.5s ease;
}



/* 分类颜色 */
.vocabulary { border-top: 3px solid #4361ee; }
.vocabulary .dimension-icon { color: #4361ee; }
.vocabulary:hover { background: #f0f5ff; }

.sentence { border-top: 3px solid #4cc9f0; }
.sentence .dimension-icon { color: #4cc9f0; }
.sentence:hover { background: #f0fcff; }

.structure { border-top: 3px solid #7209b7; }
.structure .dimension-icon { color: #7209b7; }
.structure:hover { background: #f9f0ff; }

.content { border-top: 3px solid #f8961e; }
.content .dimension-icon { color: #f8961e; }
.content:hover { background: #fff9f0; }

/* 反馈部分 */
.feedback-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0 20px 20px;
}

@media (min-width: 768px) {
  .feedback-section {
    grid-template-columns: 1fr 1fr;
  }
}

.feedback-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.feedback-card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.feedback-header {
  display: flex;
  align-items: center;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.feedback-header i {
  margin-right: 10px;
  font-size: 1.2rem;
}

.good-sentences .feedback-header i { color: #4cc9f0; }
.suggestions .feedback-header i { color: #f8961e; }

.feedback-list {
  padding: 0 15px 15px;
  margin: 0;
  list-style: none;
}

.feedback-list li {
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
  display: flex;
  align-items: flex-start;
}

.feedback-list li:last-child {
  border-bottom: none;
}

.feedback-list li i {
  margin-right: 10px;
  color: #6c757d;
  font-size: 0.8rem;
  margin-top: 4px;
}
/* 修改维度评分部分的CSS */
.dimension-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 强制4列布局 */
  gap: 8px; /* 缩小间距 */
  margin: 15px 0;
}

.dimension-card {
  padding: 12px 8px; /* 减小内边距 */
  min-height: 90px; /* 固定高度保持统一 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dimension-icon {
  font-size: 1.5rem; /* 适当缩小图标 */
  margin-bottom: 6px;
}

.dimension-info {
  text-align: center;
}

.dimension-name {
  font-size: 0.85rem; /* 缩小文字 */
  margin-bottom: 4px;
}

.dimension-value {
  font-size: 1.2rem; /* 适当调整数字大小 */
  font-weight: bold;
}

/* 移除悬停上浮效果（可选） */
.dimension-card:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
/* 评分维度网格样式 */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 15px;
  margin: 15px 0;
}

.dimension-item {
  border-radius: 8px;
  padding: 15px 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 图片中的配色方案 */
.dimension-item.vocab {
  background-color: #e6f7e6; /* 浅绿色 */
  border-top: 3px solid #4CAF50;
}

.dimension-item.sentence {
  background-color: #fff9e6; /* 浅黄色 */
  border-top: 3px solid #FFC107;
}

.dimension-item.structure {
  background-color: #fff0e6; /* 浅橙色 */
  border-top: 3px solid #FF9800;
}

.dimension-item.content {
  background-color: #ffe6f2; /* 浅粉色 */
  border-top: 3px solid #E91E63;
}

.dimension-name {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

.dimension-score {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}
/* 评分维度网格样式 - 完全匹配图片效果 */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 20px;
  background-color: #f9f9f9; /* 图片中的浅色背景 */
  border-radius: 10px;
  margin: 20px 0;
}

.dimension-item {
  background: white;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

/* 图片中的颜色方案 */
.dimension-item.vocab {
  border-top: 3px solid #4CAF50; /* 词汇绿色 */
}

.dimension-item.sentence {
  border-top: 3px solid #FFC107; /* 句子黄色 */
}

.dimension-item.structure {
  border-top: 3px solid #2196F3; /* 结构蓝色 */
}

.dimension-item.content {
  border-top: 3px solid #E91E63; /* 内容粉色 */
}

/* 文字样式 - 匹配图片 */
.dimension-name {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
  font-weight: 500;
}

.dimension-score {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

/* 悬停效果 - 增强交互 */
.dimension-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .dimension-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .dimension-grid {
    grid-template-columns: 1fr;
  }
}
/* 优秀句子样式 - 匹配图片设计 */
.sentence-item {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.quote-content {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.quote-icon {
  color: #4CAF50;
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 14px;
}

.quote-reason {
  background: #f5f5f5;
  border-left: 3px solid #2196F3;
  padding: 10px 15px;
  font-size: 14px;
  color: #555;
  border-radius: 0 4px 4px 0;
  position: relative;
  padding-left: 30px;
}

.reason-icon {
  color: #FFC107;
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 14px;
}

.no-sentence {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 20px;
}